<%@ page import="java.io.StringWriter" %>
<%@ page import="java.io.PrintWriter" %>
<%@ page import="javax.portlet.PortletSession" %>

<c:if test="${sessionScope['processActionException'] != null}">
    <% 
        Throwable t = (Throwable)renderRequest.getPortletSession().getAttribute("processActionException", PortletSession.APPLICATION_SCOPE);
        renderRequest.getPortletSession().removeAttribute("processActionException", PortletSession.APPLICATION_SCOPE);        
        StringWriter st = new StringWriter();
        PrintWriter pw = new PrintWriter(st);
        t.printStackTrace(pw);
        portletConfig.getPortletContext().log("exception occured in process action", t);
    %>
    <div class="portlet-msg-error" style="color: red">
        <fmt:message key="processActionException"/>        
        <div style="font-size: smaller">            
            <pre><%= t.getMessage() %></pre>
        </div>
    </div>
    <!--
    <%= st %>
    -->       
</c:if>
